cmake_minimum_required(VERSION 3.20)
project(BattleCity)

set(CMAKE_CXX_STANDARD 17)

#加载SDL库
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(SDL2_mixer REQUIRED)
find_package(SDL2_ttf REQUIRED)


#设置exe生成路径
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR})

include_directories(${CMAKE_SOURCE_DIR}/src)
#aux_source_directory(src SRC_LIST)
add_executable(BattleCity   main.cpp 
                            src/Game.cpp 
                            src/BeginScene.cpp 
                            src/BeginAnimationScene.cpp 
                            src/GameScene.cpp
                            src/Scene.cpp
                            src/MakeMapScene.cpp
                            src/TextureLoader.cpp
                            src/Object.cpp
                            src/Enemy.cpp
                            src/Player.cpp
                            src/Bullet.cpp
                            src/Tank.cpp
                            src/Animation.cpp
            
                            )
target_link_libraries(BattleCity 
                                ${SDL2_LIBRARIES} 
                                SDL2_image::SDL2_image
                                SDL2_mixer::SDL2_mixer
                                SDL2_ttf::SDL2_ttf

                                #Json
                                #jsoncpp
                                )